<?=$this->messages(); ?>
<?=$this->itemId($this->model_user->getID()); ?>
<table>
    <tr>
        <td class="title">Login:</td>
        <td class="input_field">
            <input type="text" name="login" id="login" value="<?=$this->model_user->getLogin(); ?>" />
        </td>
    </tr>
    <tr>
        <td class="title">Password:</td>
        <td class="input_field">
            <input type="password" name="password" id="password" value="" />
        </td>
    </tr>
    <tr>
        <td class="title">Name:</td>
        <td class="input_field">
            <input type="text" name="name" id="name" value="<?=$this->model_user->getName(); ?>" />
        </td>
    </tr>
    <tr>
        <td class="title">Last name:</td>
        <td class="input_field">
            <input type="text" name="last_name" id="last_name" value="<?=$this->model_user->getLastName(); ?>" />
        </td>
    </tr>
    <tr>
        <td class="title">Role:</td>
        <td class="input_field">
            <select id = "role">
            <?
            foreach ($this->model_user->getRoles() as $key => $value)
            {
            ?>
                <option value = "<?=$key; ?>" <?if ($key == $this->model_user->getRole()){?>selected = "selected"<?}?>><?=$value; ?></option>
            <?
            }
            ?>
            </select>
        </td>
    </tr>
</table>
<?=$this->buttons(); ?>